<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户注册 - 应急防护小站</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="bg-gray-50 min-h-screen flex items-center justify-center">
    <div class="container">
        <div style="color:indigo;">注册JSP已加载</div>
        <% System.out.println("register.jsp loaded"); %>
        
        <div class="max-w-md w-full mx-auto">
            <!-- 注册卡片 -->
            <div class="bg-white rounded-2xl shadow-xl p-8">
                <!-- 标题区域 -->
                <div class="text-center mb-8">
                    <div class="flex items-center justify-center mb-4">
                        <i class="fa-solid fa-shield-alt text-indigo-600 text-3xl mr-3"></i>
                        <h1 class="text-2xl font-bold text-gray-900">应急防护小站</h1>
                    </div>
                    <p class="text-gray-600">创建您的账户，开始防护之旅</p>
                </div>
                
                <!-- 注册表单 -->
                <form action="register" method="post" class="space-y-6">
                    <!-- 用户名输入 -->
                    <div>
                        <label for="username" class="block text-sm font-medium text-gray-700 mb-2">
                            <i class="fa-solid fa-user text-indigo-600 mr-1"></i>用户名
                        </label>
                        <input type="text" id="username" name="username" required 
                               class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors"
                               placeholder="请输入用户名">
                    </div>
                    
                    <!-- 密码输入 -->
                    <div>
                        <label for="password" class="block text-sm font-medium text-gray-700 mb-2">
                            <i class="fa-solid fa-lock text-indigo-600 mr-1"></i>密码
                        </label>
                        <input type="password" id="password" name="password" required 
                               class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors"
                               placeholder="请输入密码">
                    </div>
                    
                    <!-- 确认密码 -->
                    <div>
                        <label for="confirmPassword" class="block text-sm font-medium text-gray-700 mb-2">
                            <i class="fa-solid fa-lock text-indigo-600 mr-1"></i>确认密码
                        </label>
                        <input type="password" id="confirmPassword" name="confirmPassword" required 
                               class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors"
                               placeholder="请再次输入密码">
                    </div>
                    
                    <!-- 邮箱输入 -->
                    <div>
                        <label for="email" class="block text-sm font-medium text-gray-700 mb-2">
                            <i class="fa-solid fa-envelope text-indigo-600 mr-1"></i>邮箱
                        </label>
                        <input type="email" id="email" name="email" 
                               class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors"
                               placeholder="请输入邮箱（可选）">
                    </div>
                    
                    <!-- 同意条款 -->
                    <div class="flex items-start">
                        <input type="checkbox" id="agree" name="agree" required 
                               class="mt-1 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500">
                        <label for="agree" class="ml-2 text-sm text-gray-600">
                            我同意 <a href="#" class="text-indigo-600 hover:text-indigo-500">服务条款</a> 和 
                            <a href="#" class="text-indigo-600 hover:text-indigo-500">隐私政策</a>
                        </label>
                    </div>
                    
                    <!-- 注册按钮 -->
                    <button type="submit" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-3 px-4 rounded-lg font-bold text-lg transition duration-200 flex items-center justify-center">
                        <i class="fa-solid fa-user-plus mr-2"></i>注册
                    </button>
                </form>
                
                <!-- 分割线 -->
                <div class="my-6 flex items-center">
                    <div class="flex-1 border-t border-gray-300"></div>
                    <span class="px-4 text-gray-500 text-sm">或者</span>
                    <div class="flex-1 border-t border-gray-300"></div>
                </div>
                
                <!-- 登录链接 -->
                <div class="text-center">
                    <p class="text-gray-600">已有账户？</p>
                    <a href="login.jsp" class="text-indigo-600 hover:text-indigo-500 font-medium">立即登录</a>
                </div>
                
                <!-- 返回首页 -->
                <div class="mt-6 text-center">
                    <a href="index.jsp" class="text-gray-500 hover:text-indigo-600 flex items-center justify-center">
                        <i class="fa-solid fa-arrow-left mr-1"></i> 返回首页
                    </a>
                </div>
            </div>
            
            <!-- 底部信息 -->
            <div class="text-center mt-8">
                <p class="text-gray-500 text-sm">&copy; 2025 应急防护小站. 保留所有权利.</p>
            </div>
        </div>
    </div>
</body>
</html> 